<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- div>lorem10*3 -->
    <div class="div">
        <div class="div1">Lorem ipsum dolor sit, amet consectetur adipisicing elit. Beatae, reiciendis!
            <div class="div2">Beatae neque dicta eveniet deleniti odio dolores modi, dignissimos commodi?</div>
        </div>

    </div>
    <style>
        div {
            color: #fff;
        }

        .div {
            position: relative;

        }

        .div1 {
            width: 200px;
            height: 400px;
            background-color: red;
            position: absolute;
            z-index: auto;
            inset: 0;
        }

        .div2 {
            width: 300px;
            height: 120px;
            background-color: blue;
            position: relative;
            z-index: -1;

        }
    </style>
</body>

</html>